package git.soulbgm.group;

import git.soulbgm.cache.annotation.GetGroupData;
import git.soulbgm.cache.enumeration.TimeLevel;
import git.soulbgm.pojo.ReceiveDataStatistics;
import org.springframework.stereotype.Service;

import java.util.List;

import static git.soulbgm.common.Constants.*;

/**
 * 接收数据获取分组统计
 *
 * @author SoulBGM
 * @date 2022/03/03 13:12
 */
@Service
public class ReceiveDataGetGroup {

    /**
     * 获得统计数据
     *
     * @param startTime       开始时间
     * @param endTime         结束时间
     * @param timeLevel       时间等级
     * @param readAfterDelete 是否读取后删除
     * @param list            数据
     * @return {@link List}<{@link ReceiveDataStatistics}>
     */
    @GetGroupData(groupName = GN_RECEIVE_DATA,
            groupBy = {"sourceCode", "dataType"},
            groupField = {"segmentNum", "dataSegmentLength"})
    public List<ReceiveDataStatistics> getStatisticsData(long startTime, long endTime, TimeLevel timeLevel, boolean readAfterDelete, List<ReceiveDataStatistics> list) {
        return list;
    }

}
